This invention relates to management of a computer system for executing a plurality of guest OS'es by means of a virtual machine mechanism or a logical partitioning mechanism. This invention more particularly relates to a method and a system for determining whether, when a virtual machine is executed on a certain host machine, the virtual machine can access storage volumes and networks to be used by the virtual machine before the virtual machine is actually executed on the host machine.
A technology of building virtual machines on a single physical machine, and causing the virtual machines to execute a plurality of operating systems (OS'es) in parallel has become widespread. Technologies of realizing such a technology include the virtual machine system and the logical partitioning system (LPAR). The OS'es executed according to those technologies are referred to as guest OS'es.
According to the virtual machine system, a control software program referred to as a virtual machine monitor (VMM) generates a plurality of virtual machines (VM's) by virtualizing a special register (control register) for controlling operations of hardware and a processor of a physical machine. The guest OS is executed on the VM generated by the VMM. Specifically, the VMM traps and emulates privileged instructions of a CPU such as I/O instructions and operations on the control register executed by the guest OS, thereby producing a virtual machine environment. In the virtual machine system, a plurality of guest OS'es can share a single physical I/O device. This is realized by a process (emulation) in which the VMM traps access to a virtual I/O device apparent to the guest OS, and converts this access to access to the actual physical I/O device. As a result, there is provided a flexible virtual machine environment less dependent on physical I/O devices mounted on a physical machine.
In the I/O control of the virtual machine system, the I/O operation by the guest OS is emulated by the VMM, resulting in an overhead. Moreover, the VMM for the VM's emulates an I/O operation of other guest OS'es executed in parallel, and thus, the overhead also depends on the processes of those other guest OS'es, and there is posed a problem in that performance prediction is difficult.
On the other hand, according to the logical partitioning system, a control software program referred to as a hypervisor produces a plurality of VM's by logically partitioning resources of a physical machine. The hypervisor logically partitions the physical machine by manipulating tables and registers referred to by a processor and other hardware components. A guest OS is executed in a partition (logical partition) logically partitioned by the hypervisor. Instructions executed by the guest OS are not emulated, but are directly executed by the processor. As a result, the guest OS is hardly affected by other OS'es executed on the same physical machine, resulting in a high-performance and highly-reliable virtual machine environment. On the other hand, the logical partitioning system produces a plurality of VM's by partitioning hardware resources, and thus, an I/O device cannot be shared by a plurality of guest OS'es. In the logical partitioning system, when the I/O device is shared by the plurality of guest OS'es, adaptation to the I/O device is required.
As described above, VM's executing guest OS'es are generated by emulating privileged instructions in the virtual machine system, or by partitioning a physical machine by the hypervisor in the logical partitioning system.
Those technologies have been conventionally realized mainly on computers in the mainframe class. This is because realization of those technologies provided with a high performance requires special hardware such as a processor prepared for a VM, and a mechanism carrying out the emulation process of the VMM as hardware. As a result of an increase in performance of processors and integration of a virtualization mechanism in recent years, a sufficient performance is provided even when those processes are executed on a processor, and thus, the virtual machine system and the logical partitioning system have become widespread in general computers in addition to the computers in the mainframe class.
The virtual machine system has a characteristic that a VM defined on a certain machine can be executed on another machine operated by a VMM. It is also possible to move (migrate) an operating VM to another machine without stopping the operating VM. If a VMM on a machine of the migration destination can be configured to emulate I/O devices required by the VM to migrate as set on originally defined I/O devices, the VM can be executed on the machine of the migration destination exactly as before the migration.
Those technologies can integrate systems running on a plurality of physical machines to a single physical machine, can balance loads by means of migration of guest OS'es according to loads imposed on machines, and can increase the availability of a computer system by means of migration of guest OS'es in a case of a machine failure. As an example of relocation of a VM to another machine in a system, US Patent Application Publication No. 2006/00697 discloses a method of relocating a VM according to an operating state of a machine.
Moreover, on a VM, hardware mechanisms enabling a guest OS to directly operate I/O devices are provided. One of those mechanisms is an I/O address conversion mechanism. Generally, when an OS instructs an I/O device to transfer data by means of the DMA, the OS specifies a physical address of a destination of the data transfer for the I/O device. If an OS is executed on a VM, a physical address specified by the guest OS is a physical address virtualized by a VMM, and is not an actual physical address. On the other hand, a physical address space apparent to the I/O device is an actual physical address space. The I/O address conversion mechanism converts a transfer destination address for the DMA transfer from the I/O device according to the guest OS using the I/O device, thereby causing data to be transferred to a physical memory area assigned to the guest OS. When the VMM sets the I/O address conversion mechanism according to a configuration of the guest OS and a state of a memory assignment, even if the guest OS does not know the actual physical memory address, the guest OS can issue an I/O instruction directly to the I/O device. The I/O address conversion mechanism is, for example, realized as described in “AMD I/O Virtualization Technology (IOMMU) Specification”, p. 14, “2.2.5 Virtual Machine Guest Access to Devices”, February 2006, Advance Micro Devices, Inc., which is available on the Internet at http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_d ocs/34434.pdf (retrieved on Jul. 24, 2006).
As for storage systems and networks, a computer and a storage system, and a computer and a network are coupled via a switch, and it is possible to restrict logical volumes and network devices connectable from the computer using a function of an adaptor of the computer and a function of the switch. As examples of those functions, there are zoning of a fibre channel for the storage system, and the VLAN based on the Ethernet (registered trademark) for the network. Using those technologies, it is possible to logically partition connections to a storage system and a network, thereby increasing throughput and system security.